import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {HttpClientModule} from '@angular/common/http';

import {AppComponent} from './app.component';
import {PluginModule} from './plugin/plugin.module';
import {DemoModule} from './demo/demo.module';


@NgModule({
  imports: [
    BrowserModule,
    HttpClientModule,
    PluginModule,
    DemoModule,
    RouterModule.forRoot([
      {
        path: 'demo',
        loadChildren: './demo/demo.module#DemoModule'
      },
      {
        path: 'plugin',
        loadChildren: './plugin/plugin.module#PluginModule'
      },
      {
        path: '',
        redirectTo: 'demo',
        pathMatch: 'full'
      }
    ])
  ],
  declarations: [
    AppComponent,
  ],
  providers: [],
  bootstrap: [AppComponent],
  entryComponents: []
})
export class AppModule {
}
